import request from '@/utils/request'

/**
 * 查询用户列表
 */
 export const userList = (params, page, size) => {
  return request({
    url: `/sys/user/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}

// 查询所属角色
export const roleList = () => {
  return request({
    url: '/sys/role',
  })
}

// 查询所属部门
export const department = () => {
  return request({
    url: '/sys/dept',
  })
}

// 删除用户
export const deleuser = (id) => {
  return request({
    url: `/sys/user/${id}`,
    method: 'DELETE',
  })
}

// 保存或修改用户信息
export const modify = (params) => {
  return request({
    url: '/sys/user',
    method: 'POST',
    data: params
  })
}
